<div class="tools">
    <ul class="toolbar">
        <li class="click">
            <a href="<?php echo ADMIN_DIR.'manager/add'; ?>" >
                <span>
                    <img src="/houtai/images/t01.png" alt="">
                </span>
                添加
            </a>
        </li>
    </ul>   
</div>
<table class="imgtable">
	<thead>
		<tr>
			<th>管理员ID</th>
			<th>管理员名称</th>
			<th>最后登录时间</th>
			<th>最后登录IP</th>
			<th>角色</th>
			<th>操作</th>
		</tr>
	</thead>
	<?php if (!empty($list)): ?>
		<tbody>
			<?php foreach ($list as $k => $v): ?>
				<tr>
					<td><?php echo $v['id'] ?></td>
					<td><?php echo $v['username'] ?></td>
					<td>
						<?php echo empty($v['loginTime']) ? '' : date('Y-m-d H:i:s',$v['loginTime']); ?>
					</td>
					<td>
						<?php echo empty($v['loginIP']) ? '' : long2ip($v['loginIP']); ?>
					</td>
					<td>
						<?php if ( !empty($v['roles']) ): ?>
							<?php foreach ($v['roles'] as $role): ?>
								<span><b><?php echo $role['name']; ?></b><?php echo '[ID:',$role['id'],']'; ?></span>
							<?php endforeach; ?>
						<?php endif; ?>
					</td>
					<td>
						<a class="ibtn" href="<?php echo ADMIN_DIR.'manager/update?aid='.$v['id'] ?>">修改</a>
						<a class="ibtn" href="<?php echo ADMIN_DIR.'manager/delete?aid='.$v['id'] ?>">删除</a>
					</td>
				</tr>
			<?php endforeach; ?>
		</tbody>
	<?php endif; ?>
</table>

